<template>
	<span>
		{{getText}}
	</span>
</template>
<script>
	import {
		CodeToText
	} from 'element-china-area-data'

	export default {
		data() {
			return {
				currentValue:'',
			}
		},
		created() {
			this.currentValue = this.params.value 
			if(this.currentValue!=undefined){
				for(let i=0;i<this.currentValue.length;i++){
					if(this.currentValue[i]!=''){
						this.currentValue[i] = parseInt(this.currentValue[i])
					}
				}
			}
		},
		computed:{
			getText() {
				let codeArea = []
				if(this.currentValue==undefined){
					return ''
				}
				for (let s of this.currentValue) {
					if(s!=''){
						codeArea.push(CodeToText[s])
					}else{
						codeArea.push('全部')
					}
				}
				return codeArea.join('/')
			}
		},
		methods: {
			
		}
	}
</script>
